package com.naiterui.ehp.bs.cms.modules.agent.vo;

import com.naiterui.ehp.bs.cms.modules.agent.entity.AgAgent;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

/**
 * @author yiren
 * @since 2022/2/15
 */
@Data
@Builder
public class SearchItemVO {
	@ApiModelProperty(value = "经纪人ID")
	private Long id;

	@ApiModelProperty(value = "姓名")
	private String name;

	@ApiModelProperty(value = "手机号")
	private String phone;

	@ApiModelProperty(value = "身份证号")
	private String cardNo;

	public static SearchItemVO of(AgAgent agent){
		return SearchItemVO.builder()
				.id(agent.getId())
				.name(agent.getName())
				.phone(agent.getPhone())
				.cardNo(agent.getCardNo())
				.build();
	}
}
